<template>
	<div class="main">
		<div class="about_box">
			<div class="avatar">
				<div class="text">头像</div>
				<img
						:src="user.Head"
						alt=""
						>
			</div>
			<div>
				<div class="text">姓名</div>
				<div style="font-size:12px;line-height:1.3">{{user.UserKindName}}</div>
			</div>
			<div @click="_goEmail">
				<div class="text">部门</div>
				<div class="mr-10">{{user.Email}}</div>
			</div>
			<div @click="_goPhone">
				<div class="text">岗位</div>
				<div class="mr-10">{{user.Mobile}}</div>
			</div>
			<div @click="_goPhone">
				<div class="text">手机</div>
				<div class="mr-10">{{user.Mobile}}</div>
			</div>
			<div @click="_goPhone">
				<div class="text">邮箱</div>
				<div class="mr-10">{{user.Mobile}}</div>
			</div>
		</div>
	</div>
</template>

<script>
import { Toast } from 'vant'
var wait = 60
export default {
	components: {},
	data() {
		return {
			code: '',
			mobile: '',
			verifyCode: '',
			NewPassword: '',
			isPhone: false,
			user:{}
		}
	},
	created(){
		this.getUserInfo()
	},
	methods: {
			getUserInfo() {

				let url = '/UserUser/GetMyPersionalInfo' // /api/goods

				this.$axios
						.get(url)
						.then((res) => {
							this.user = res.data
						})
						.catch((err) => {
							console.log('err', err)
						})
			},
		_goEmail() {
			this.$router.push('/my/email')
		},
		_goPhone() {
			this.$router.push('/my/phone?phone='+this.user.Mobile)
		},
		_ChangePassword() {
			this.$router.push('/my/changePassword')
		},

	},
}
</script>

<style lang="less" scoped>
	.about_box{
		background-color: #fff;
		.avatar{
			height: 80px;
			img{
				height: 50px;
				width: 50px;
				border-radius: 50%;
			}
		}
		> div{
			display: flex;
			align-items: center;
			justify-content: space-between;
			border-bottom: 2px solid #e8f1f8;
			padding: 10px;
			.text{
				width: 300px;
			}
		}
		img{
			height: 15px;
			width: 15px;
		}
	}
	.change_password{
		margin-top: 10px;
		padding: 10px;
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		img{
			height: 15px;
			width: 15px;
		}
	}
</style>

